//
//  UIBarButtonItem+Category.m
//  PiPiPineapple
//
//  Created by 李晓东 on 17/11/15.
//  Copyright © 2017年 PeanutXu. All rights reserved.
//

#import "UIBarButtonItem+Category.h"

@implementation UIBarButtonItem (Category)
- (instancetype)initWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style target:(id)target action:(SEL)action index:(NSInteger)index{
    
    
    if(self = [self initWithTitle:title style:style target:target action:action]) {
        switch (index) {
            case 0:
                self.tag = 0;
                break;
            case 1:
                self.tag = 1;
                break;
            case 2:
                self.tag = 2;
                break;
            case 3:
                self.tag = 3;
                break;
            case 4:
                self.tag = 4;
                break;
            case 5:
//                self.tag = 5;
                break;
            case 6:
                self.tag = 5;
                break;
            case 7:
                self.tag = 6;
                break;
            case 8:
                self.tag = 7;
                break;
            case 9:
                self.tag = 8;
                break;
            case 10:
                self.tag = 9;
                break;
            case 11:
                self.tag = 10;
                break;
            case 12:
                self.tag = 11;
                break;
            case 13:
                self.tag = 12;
                break;
            case 14:
                self.tag = 13;
                break;
            case 15:
                self.tag = 14;
                break;
            case 16:
                self.tag = 15;
                break;
            case 17:
                self.tag = 16;
                break;
            case 18:
                self.tag = 17;
                break;
            case 19:
                self.tag = 18;
                break;
            case 20:
                self.tag = 19;
                break;
            case 21:
                self.tag = 20;
                break;
            case 22:
                self.tag = 21;
                break;
            case 23:
                self.tag = 22;
                break;
            case 24:
                self.tag = 23;
                break;
            case 25:
                self.tag = 24;
                break;
            case 26:
                self.tag = 25;
                break;
            case 27:
                self.tag = 26;
                break;
            case 28:
                self.tag = 27;
                break;
            case 29:
                self.tag = 28;
                break;
            case 30:
                self.tag = 29;
                break;
            case 31:
                self.tag = 30;
                break;
            case 32:
                self.tag = 31;
                break;
            case 33:
                self.tag = 32;
                break;
            case 34:
                self.tag = 33;
                break;
            case 35:
                self.tag = 34;
                break;
            case 36:
                self.tag = 35;
                break;
            case 37:
                self.tag = 36;
                break;
            case 38:
                self.tag = 37;
                break;
            case 39:
                self.tag = 38;
                break;
            case 40:
                self.tag = 39;
                break;
            case 41:
                self.tag = 40;
                break;
            case 42:
                self.tag = 41;
                break;
            case 43:
                self.tag = 42;
                break;
            case 44:
                self.tag = 43;
                break;
            case 45:
                self.tag = 44;
                break;
            case 46:
                self.tag = 45;
                break;
            case 47:
                self.tag = 46;
                break;
            case 48:
                self.tag = 47;
                break;
            default:
                break;
        }
    }
    return self;
}
@end
///Users/lixiaodong/Documents/ios/15年传智播客/视频模仿代码/知识拓展/d10/PiPiPineapple/PiPiPineapple/Extension/UIBarButtonItem+Category.m:14:5: The result of a delegate init call must be immediately returned or assigned to 'self'
